package com.jiaai.guard;

import com.jiaai.exception.ServerException;
import com.jiaai.guard.model.GuardRankingVo;
import com.jiaai.guard.model.GuardVo;

import java.util.List;
import java.util.Map;


public interface IGuardApi {

    /**
     * 创建守护
     * @param guardVo
     */
    void createGuard(GuardVo guardVo,String createBy);


    /**
     * 开通守护
     * @param buyMId  开通用户ID
     * @param guardId  守护ID
     * @param targetMId 守护的用户ID

     */
    void purchase(String buyMId,Integer guardId,String targetMId) throws ServerException;

    /**
     * 查询用户的开通记录
     * @param mId
     * @return
     */
    List<Map<String,Object>> findPurchaseHistory(String mId);

    /**
     * 查询指定用户的守护排行信息
     * @param mId
     * @return
     */
    List<Map<String,Object>>  findRankingByMId(String mId);

    public Object findByAll(GuardVo guardVo) throws Exception;
    public Object editGuard(GuardVo guardVo);



}
